package summer_vacation.lvchang.myyVacation;
import java.util.Scanner;
/**
 * Created by Administrator on 2015/9/8.
 */
public class Text14 {
    public static void main(String[] args) {

        Scanner input=new Scanner(System.in);
        System.out.println("请输入一个整数a:");
        int a=input.nextInt();
        System.out.print("整数a的所有素数因数：");
        for(int i=2;i<=a;i++) {
            if(a%i==0){
                boolean isF = true;
                for(int x=2;x<i;x++)
                {
                    if(i%x==0){
                        isF = false;
                        break;
                    }else{
                        continue;
                    }
                }
                if(isF){
                    System.out.print(" "+i);
                }
            }
        }
    }
    }

